package flash.net;

extern class NetStream extends flash.events.EventDispatcher
{
	static var DIRECT_CONNECTIONS:String = "directConnections";
	static var CONNECT_TO_FMS:String = "connectToFMS";
	static function resetDRMVouchers():Void;
	function dispose():Void;
	function attach(connection:flash.net.NetConnection):Void;
	function close():Void;
	function attachAudio(microphone:flash.media.Microphone):Void;
	function attachCamera(theCamera:flash.media.Camera, snapshotMilliseconds:Int = -1):Void;
	function send(handlerName:String, arg1:Dynamic = null, arg2:Dynamic = null, arg3:Dynamic = null, arg4:Dynamic = null, arg5:Dynamic = null, arg6:Dynamic = null, arg7:Dynamic = null, arg8:Dynamic = null, arg9:Dynamic = null, arg10:Dynamic = null):Void;
	function step(frames:Int):Void;
	function receiveAudio(flag:Bool):Void;
	function receiveVideo(flag:Bool):Void;
	function receiveVideoFPS(FPS:Float):Void;
	function pause():Void;
	function resume():Void;
	function togglePause():Void;
	function seek(offset:Float):Void;
	function play(arg1:Dynamic = null, arg2:Dynamic = null, arg3:Dynamic = null, arg4:Dynamic = null, arg5:Dynamic = null, arg6:Dynamic = null, arg7:Dynamic = null, arg8:Dynamic = null, arg9:Dynamic = null, arg10:Dynamic = null):Void;
	function play2(param:flash.net.NetStreamPlayOptions):Void;
	function publish(name:String = null, type:String = null):Void;
	function onPeerConnect(subscriber:flash.net.NetStream):Bool;
	function appendBytes(bytes:flash.utils.ByteArray):Void;
	function appendBytesAction(netStreamAppendBytesAction:String):Void;
	function setDRMAuthenticationCredentials(userName:String, password:String, type:String):Void;
	function preloadEmbeddedData(param:flash.net.NetStreamPlayOptions):Void;
	var useHardwareDecoder:Bool;
	var multicastInfo(default, null):flash.net.NetStreamMulticastInfo;
	var backBufferTime:Float;
	var bytesLoaded(default, null):UInt;
	var farNonce(default, null):String;
	var nearNonce(default, null):String;
	var checkPolicyFile:Bool;
	var objectEncoding(default, null):UInt;
	var client:Dynamic;
	var multicastAvailabilityUpdatePeriod:Float;
	var currentFPS(default, null):Float;
	var audioCodec(default, null):UInt;
	var inBufferSeek:Bool;
	var multicastFetchPeriod:Float;
	var peerStreams(default, null):Array<flash.net.NetStream>;
	var multicastWindowDuration:Float;
	var audioSampleAccess:Bool;
	var bufferTimeMax:Float;
	var info(default, null):flash.net.NetStreamInfo;
	var farID(default, null):String;
	var videoCodec(default, null):UInt;
	var decodedFrames(default, null):UInt;
	var bytesTotal(default, null):UInt;
	var soundTransform:flash.media.SoundTransform;
	var bufferLength(default, null):Float;
	var videoSampleAccess:Bool;
	var audioReliable:Bool;
	var videoStreamSettings:flash.media.VideoStreamSettings;
	var maxPauseBufferTime:Float;
	var multicastPushNeighborLimit:Float;
	var multicastRelayMarginDuration:Float;
	var bufferTime:Float;
	var backBufferLength(default, null):Float;
	var time(default, null):Float;
	var liveDelay(default, null):Float;
	var multicastAvailabilitySendToAll:Bool;
	var videoReliable:Bool;
	var dataReliable:Bool;
	function new(connection:flash.net.NetConnection, peerID:String = "connectToFMS"):Void;
}